from django.urls import path
from . import views
from . import views_cashier
from .views import CategoryDetailView  # 确保导入了正确的视图
from .views import ProductDetailView  # 确保导入了正确的视图
urlpatterns = [
    path('', views.index, name='index'),
    path('index/', views.index, name='index'),
    path('detail/',views.DetailView.as_view(),name='detail'),#
    path('goods/',views.GoodsView.as_view(),name='goods'),#
    path('api/products/', views.ProductListView.as_view(), name='product_list'),
    path('api/categories/', views.CategoryListView.as_view(), name='category_list'),
    # path('goods/<int:Product_id>/', views.goods, name='goods'),
<<<<<<< HEAD
    path('goods/', views.goods, name='goods'),
    # path('detail/<int:Product_id>/', views.detail, name='detail'),
    # path('goods/<int:goods_id>/', views.goods_detail, name='goods_detail'),
    # path('goods/', views.goods_list, name='goods_list'),
    path('detail/<int:product_id>/', views.detail, name='detail'),   # 商品详情页
=======
    # path('goods/', views.goods, name='goods'),
    # path('Product_detail/<int:product_id>/', views.Product_detail, name='Product_detail'),
    # path('detail/<int:Product_id>/', views.detail, name='detail'),
    # path('detail/', views.detail, name='detail'),
    # path('goods/<int:goods_id>/', views.goods_detail, name='goods_detail'),
    # path('goods/', views.goods_list, name='goods_list'),
>>>>>>> 0ac75087e5e07a3ef0624f7a4a9866c7346941b7
    path('cart/add_cart/', views.add_cart, name='add_cart'),
    # path('cart/show_cart/', views.show_cart, name='show_cart'),
    # path('cart/remove_cart/', views.remove_from_cart, name='remove_from_cart'),
    # path('order/goods/', views.order_goods, name='order_goods'),
    # path('cart/products/', views.cart_products, name='cart_products'),
    # path('cart/update_cart/', views.update_cart, name='update_cart'),
    # path('checkout/', views.checkout, name='checkout'),
    # path('user_center/', views.user_center, name='user_center'),
    # path('checkout/', views.checkout, name='checkout'),
    # path('cashier/', views_cashier.cashier, name='cashier'),
    # path('cashier/add_to_cart/', views_cashier.add_to_cart_cashier, name='add_to_cart_cashier'),
    # path('cashier/checkout/', views_cashier.checkout, name='cashier_checkout'),
    #   path('api/categories/', CategoryListView.as_view(), name='category_list'),
    # path('api/products/', ProductListView.as_view(), name='product_list'),
    # # path('stock_view/', views.stock_view, name='stock_view'),
    # path('cashier/', views.cashier, name='cashier'),
    # path('order-confirmation/<int:order_id>/', views.order_confirmation, name='order_confirmation'),
    path('category/<int:pk>/', CategoryDetailView.as_view(), name='category_detail'),
    path('goods/<int:pk>/', ProductDetailView.as_view(), name='product_detail'),
]
<<<<<<< HEAD
=======
# 项目或应用目录下的 urls.py
# from django.urls import path
# from .views import CategoryDetailView  # 确保导入了正确的视图

# urlpatterns = [
#     # 其他 URL 模式...
#     path('category/<int:pk>/', CategoryDetailView.as_view(), name='category_detail'),
# ]
# # uuapp/urls.py
# from django.urls import path
# from .views import ProductDetailView  # 确保导入了正确的视图

# urlpatterns = [
#     # ... 其他 URL 模式 ...
#     path('product/<int:pk>/', ProductDetailView.as_view(), name='product_detail'),
#     # ... 其他 URL 模式 ...
# ]
>>>>>>> 0ac75087e5e07a3ef0624f7a4a9866c7346941b7
